package com.service;

import java.util.List;

import com.dao.OrderDao;
import com.model.Orders;

public class OrderService {
	OrderDao dao=new OrderDao();
	//添加一条订单页信息
	public void add(Orders orders) throws Exception{
		dao.add(orders);
	}
	//订单页进行分页展示
	public List<Orders> queryOrders_show(Orders order,int cp,int pagesize){
		return dao.queryOrders_show(order, cp, pagesize);
	}
	//查询总条数 根据需求变化,与queryOrders_show搭配使用
	public int count_user(Orders order){
		return dao.count_user(order);
	}
	//通过oid改变刚下单的订单状态改为已取消
	public void updateOrderStatus(String oid,String ostatus) throws Exception{
		dao.updateOrderStatus(oid, ostatus);
	}
}
